#!/bin/bash

dir="povray"

for f in "$dir"/*.pov; do
    FBASE="${f%.*}"
    FILEBASE=$(basename $f)
    EXT=".tga"

    echo $f
    echo $FILEBASE
    echo cook torrance
    ./raytrace 800 600 -I $f -p 3
    mv "$FBASE$EXT" "photos/""${FILEBASE%.*}"".tga"
done
